import Vue from 'vue'
import Router from 'vue-router'
import Index from '@/components/manage/Index'
import Element from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
import Order from '@/components/manage/Order'
import Address from '@/components/manage/Address'
import AllOrder from '@/components/manage/AllOrder'
import User from '@/components/manage/User'
import Member_List from '@/components/manage/Member_List'
import Collect from '@/components/manage/Collect'
import Msg from '@/components/manage/Msg'
import Links from '@/components/manage/Links'
import Member_Control from '@/components/manage/Member_Control'
import Merchandise_Control from '@/components/manage/Merchandise_Control'
import Product_Upload from '@/components/manage/Product_Upload'
import Member_Safe from '@/components/manage/Member_Safe'
import Member_Packet from '@/components/manage/Member_Packet'
import Member_Money from '@/components/manage/Member_Money'
import Member_Member from '@/components/manage/Member_Member'
import Member_Cash from '@/components/manage/Member_Cash'
import Member_Results from '@/components/manage/Member_Results'
import Member_Commission from '@/components/manage/Member_Commission'
import news_management from '@/components/manage/news_management'
// 前台页面
import Main from '@/components/foreground/Main'
import PreIndex from '@/components/foreground/Index'
import BuyCar from '@/components/foreground/BuyCar'
import BuyCar_Two from '@/components/foreground/BuyCar_Two'
import BuyCar_Three from '@/components/foreground/BuyCar_Three'
import CategoryList from '@/components/foreground/CategoryList'
import Login from '@/components/foreground/Login'
import Product from '@/components/foreground/Product'
import Regist from '@/components/foreground/Regist'
import '../../static/css/style.css'
import Echart from '@/components/manage/Echart'
import Echarts from 'echarts'
Vue.prototype.$Echarts=Echarts
Vue.use(Echarts)
Vue.use(Element)
Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Index',
      component: Index,
      children:[
        {
         path:'/',
         component:Order
        },{
          path:'Address',
          component:Address
        },{
          path:'Echart',
          component:Echart
        },{
          path:'AllOrder',
          component:AllOrder
        },{
          path:'User',
          component:User
        },{
          path:'Member_List',
          component:Member_List
        },{
          path:'Collect',
          component:Collect
        },{
          path:'Msg',
          component:Msg
        },{
          path:'Links',
          component:Links
        },{
          path:'Member_Control',
          component:Member_Control
        },{
          path:'Merchandise_Control',
          component:Merchandise_Control
        },{
          path:'Product_Upload',
          component:Product_Upload
        },{
          path:'Member_Safe',
          component:Member_Safe
        },{
          path:'Member_Packet',
          component:Member_Packet
        },{
          path:'Member_Money',
          component:Member_Money
        },{
          path:'Member_Member',
          component:Member_Member
        },{
          path:'Member_Cash',
          component:Member_Cash
        },{
          path:'Member_Results',
          component:Member_Results
        },{
          path:'Member_Commission',
          component:Member_Commission
        },{
          path:'news_management',
          component:news_management
        }
      ]
    },{
      path: '/Index',
      name: 'PreIndex',
      component: PreIndex,
      children:[
        {
          path:'/',
          component:Main
        },{
          path:'BuyCar',
          component:BuyCar
        },{
          path:'BuyCar_Two',
          component:BuyCar_Two
        },{
          path:'BuyCar_Three',
          component:BuyCar_Three
        },{
          path:'CategoryList',
          component:CategoryList
        },{
          path:'Product',
          component:Product
        }
      ]
    },{
      path:'/Login',
      name:Login,
      component:Login
    },{
      path:'/Regist',
      name:Regist,
      component:Regist
    }
  ]
})
